<?xml version="1.0" encoding="UTF-8"?>
<!--
  Created by IntelliJ IDEA.
  User: arash
  Date: 11-11-17
  Time: 12:14 PM
-->
<!DOCTYPE html
        PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:p="http://primefaces.org/ui"
      xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:f="http://java.sun.com/jsf/core">
<ui:composition template="/WEB-INF/templates/prime.xhtml">
    <ui:define name="head">
        <style type="text/css">
            .yui-dt {
                margin-top: 10px;
            }

            .yui-dt table {
                width: 100%;
            }

            .yui-ac {
                width: 200px;
                padding-bottom: 1em;
            }

            .label {
                width: 20%;
                padding: 4px;
            }

            .value {
                width: 80%;
                padding: 4px;
            }

            .grid {
                width: 100%;
            }
        </style>
    </ui:define>


    <ui:define name="content">

        <h:form prependId="false">
            <p:dataTable id="instancesTable" lazy="false" paginator="false" var="instance"
                         value="#{panaceaController.instances}">
                <p:column>
                    <f:facet name="header">
                        <h:outputText value="Directory"/>
                    </f:facet>

                    <p:commandLink value="#{instance.directory}" action="instance.jsf" ajax="false">
                        <f:setPropertyActionListener value="#{instance}" target="#{panaceaController.instance}"/>
                    </p:commandLink>
                </p:column>
                <p:column>
                    <f:facet name="header">
                        <h:outputText value="Running"/>
                    </f:facet>
                    <h:outputText value="#{instance.running}"/>
                </p:column>
            </p:dataTable>
        </h:form>
    </ui:define>
</ui:composition>

</html>
